home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / What's New? / Development Kits / ColorSync™ 2.0.1 GM / Interfaces / AIncludes / CMApplication.a < prev    next >
Encoding:
Text File  |  1995-12-12  |  32.8 KB  |  1,577 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMApplication.a
  3. ;
  4. ;    Contains:    Color Matching Interfaces
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.0
  7. ;                Release:    2.0f3
  8. ;
  9. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, send the file and version
  13. ;                information (from above) and the problem description to:
  14. ;
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  21. __CMAPPLICATION__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  30.     include 'Quickdraw.a'
  31.     ENDIF
  32. ;        include 'MixedMode.a'                                        ;
  33. ;        include 'QuickdrawText.a'                                    ;
  34. ;            include 'ScriptLayout.a'                                ;
  35.  
  36.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  37.     include 'Files.a'
  38.     ENDIF
  39. ;        include 'OSUtils.a'                                        ;
  40. ;            include 'Memory.a'                                        ;
  41. ;        include 'Finder.a'                                            ;
  42.  
  43.     IF &TYPE('__PRINTING__') = 'UNDEFINED' THEN
  44.     include 'Printing.a'
  45.     ENDIF
  46. ;        include 'Errors.a'                                            ;
  47. ;        include 'Dialogs.a'                                        ;
  48. ;            include 'Windows.a'                                    ;
  49. ;                include 'Events.a'                                    ;
  50. ;                include 'Controls.a'                                ;
  51. ;                    include 'Collections.a'                        ;
  52. ;                    include 'Appearance.a'                            ;
  53. ;                    include 'TextObjects.a'                        ;
  54. ;                        include 'Unicode.a'                        ;
  55. ;                    include 'Menus.a'                                ;
  56. ;                include 'AppleEvents.a'                            ;
  57. ;                    include 'EPPC.a'                                ;
  58. ;                        include 'AppleTalk.a'                        ;
  59. ;                        include 'PPCToolbox.a'                        ;
  60. ;                        include 'Processes.a'                        ;
  61. ;                    include 'Notification.a'                        ;
  62. ;                        include 'Kernel.a'                            ;
  63. ;                            include 'MachineExceptions.a'            ;
  64. ;                            include 'Timing.a'                        ;
  65. ;                include 'Drag.a'                                    ;
  66. ;                    include 'TextEdit.a'                            ;
  67.  
  68.     IF &TYPE('__CMICCPROFILE__') = 'UNDEFINED' THEN
  69.     include 'CMICCProfile.a'
  70.     ENDIF
  71.  
  72. gestaltColorSync20                EQU        $0200
  73.  
  74. kDefaultCMMSignature            EQU        'appl'
  75.  
  76. ; Macintosh 68K trap word 
  77. cmTrap                            EQU        $ABEE
  78.  
  79. ; PicComment IDs 
  80. cmBeginProfile                    EQU        220
  81. cmEndProfile                    EQU        221
  82. cmEnableMatching                EQU        222
  83. cmDisableMatching                EQU        223
  84. cmComment                        EQU        224
  85.  
  86. ; PicComment selectors for cmComment 
  87. cmBeginProfileSel                EQU        0
  88. cmContinueProfileSel            EQU        1
  89. cmEndProfileSel                    EQU        2
  90.  
  91. ; Defines for version 1.0 CMProfileSearchRecord.fieldMask 
  92. cmMatchCMMType                    EQU        $00000001
  93. cmMatchApplProfileVersion        EQU        $00000002
  94. cmMatchDataType                    EQU        $00000004
  95. cmMatchDeviceType                EQU        $00000008
  96. cmMatchDeviceManufacturer        EQU        $00000010
  97. cmMatchDeviceModel                EQU        $00000020
  98. cmMatchDeviceAttributes            EQU        $00000040
  99. cmMatchFlags                    EQU        $00000080
  100. cmMatchOptions                    EQU        $00000100
  101. cmMatchWhite                    EQU        $00000200
  102. cmMatchBlack                    EQU        $00000400
  103.  
  104. ; Defines for version 2.0 CMSearchRecord.searchMask 
  105. cmMatchAnyProfile                EQU        $00000000
  106. cmMatchProfileCMMType            EQU        $00000001
  107. cmMatchProfileClass                EQU        $00000002
  108. cmMatchDataColorSpace            EQU        $00000004
  109. cmMatchProfileConnectionSpace    EQU        $00000008
  110. cmMatchManufacturer                EQU        $00000010
  111. cmMatchModel                    EQU        $00000020
  112. cmMatchAttributes                EQU        $00000040
  113. cmMatchProfileFlags                EQU        $00000080
  114.  
  115. ; Result codes 
  116. ; General Errors 
  117. cmProfileError                    EQU        -170
  118. cmMethodError                    EQU        -171
  119. cmMethodNotFound                EQU        -175                ; CMM not present 
  120. cmProfileNotFound                EQU        -176                ; Responder error 
  121. cmProfilesIdentical                EQU        -177                ; Profiles the same 
  122. cmCantConcatenateError            EQU        -178                ; Profile can't be concatenated 
  123. cmCantXYZ                        EQU        -179                ; CMM cant handle XYZ space 
  124. cmCantDeleteProfile                EQU        -180                ; Responder error 
  125. cmUnsupportedDataType            EQU        -181                ; Responder error 
  126. cmNoCurrentProfile                EQU        -182                ; Responder error 
  127. ; Profile Access Errors 
  128. cmElementTagNotFound            EQU        -4200
  129. cmIndexRangeErr                    EQU        -4201                ; Index out of range 
  130. cmCantDeleteElement                EQU        -4202
  131. cmFatalProfileErr                EQU        -4203
  132. cmInvalidProfile                EQU        -4204                ; A Profile must contain a 'cs1 ' tag to be valid 
  133. cmInvalidProfileLocation        EQU        -4205                ; Operation not supported for this profile location 
  134. ; Profile Search Errors 
  135. cmInvalidSearch                    EQU        -4206                ; Bad Search Handle 
  136. cmSearchError                    EQU        -4207
  137. cmErrIncompatibleProfile        EQU        -4208
  138. ; Other ColorSync Errors 
  139. cmInvalidColorSpace                EQU        -4209                ; Profile colorspace does not match bitmap type 
  140. cmInvalidSrcMap                    EQU        -4210                ; Source pix/bit map was invalid 
  141. cmInvalidDstMap                    EQU        -4211                ; Destination pix/bit map was invalid 
  142. cmNoGDevicesError                EQU        -4212                ; Begin/End Matching -- no gdevices available 
  143. cmInvalidProfileComment            EQU        -4213                ; Bad Profile comment during drawpicture 
  144. ; Color Conversion Errors 
  145. cmRangeOverFlow                    EQU        -4214                ; One or more output color value overflows in color conversion 
  146. ;                                                        all input color values will still be converted, and the overflown 
  147. ;                                                        will be clipped 
  148. ; Other Profile Access Errors 
  149. cmCantCopyModifiedV1Profile        EQU        -4215                ; It is illegal to copy version 1 profiles that  
  150. ;                                                        have been modified 
  151.  
  152. ; deviceType values for ColorSync 1.0 Device Profile access 
  153. cmSystemDevice                    EQU        'sys '
  154. cmGDevice                        EQU        'gdev'
  155.  
  156. ; Commands for CMFlattenUPP(…) 
  157. cmOpenReadSpool                    EQU        1
  158. cmOpenWriteSpool                EQU        2
  159. cmReadSpool                        EQU        3
  160. cmWriteSpool                    EQU        4
  161. cmCloseSpool                    EQU        5
  162.  
  163. ; Flags for PostScript-related functions 
  164. cmPS7bit                        EQU        1
  165. cmPS8bit                        EQU        2
  166.  
  167. ; Caller-supplied progress function for Bitmap & PixMap matching routines 
  168. ; Caller-supplied filter function for Profile search 
  169. ; typedef long                 CMError
  170. ; For 1.0 and 2.0 profile header variants 
  171. ; CMAppleProfileHeader 
  172. CMAppleProfileHeader     RECORD    0
  173. VariantLevel0Begin        EQU    *
  174. cm1                         ds        CMHeader
  175.                         ORG        VariantLevel0Begin
  176. cm2                         ds        CM2Header
  177.                         ORG        128
  178. sizeof                     EQU    *
  179.                         ENDR
  180.  
  181. ; typedef union CMAppleProfileHeader  CMAppleProfileHeader
  182. ; Param for CWConcatColorWorld(…) 
  183. CMConcatProfileSet         RECORD    0
  184. keyIndex                 ds.w    1                                    ; Zero-based 
  185. count                     ds.w    1                                    ; Min 1 
  186. profileSet                 ds.l    1                                    ; Variable. Ordered from Source -> Dest 
  187. sizeof                     EQU    *
  188.                         ENDR
  189.  
  190. ; typedef struct CMConcatProfileSet  CMConcatProfileSet
  191. ; ColorSync color data types 
  192. CMRGBColor                 RECORD    0
  193. red                         ds.w    1                                    ; 0..65535 
  194. green                     ds.w    1
  195. blue                     ds.w    1
  196. sizeof                     EQU    *
  197.                         ENDR
  198.  
  199. ; typedef struct CMRGBColor  CMRGBColor
  200. CMCMYKColor             RECORD    0
  201. cyan                     ds.w    1                                    ; 0..65535 
  202. magenta                     ds.w    1
  203. yellow                     ds.w    1
  204. black                     ds.w    1
  205. sizeof                     EQU    *
  206.                         ENDR
  207.  
  208. ; typedef struct CMCMYKColor  CMCMYKColor
  209. CMCMYColor                 RECORD    0
  210. cyan                     ds.w    1                                    ; 0..65535 
  211. magenta                     ds.w    1
  212. yellow                     ds.w    1
  213. sizeof                     EQU    *
  214.                         ENDR
  215.  
  216. ; typedef struct CMCMYColor  CMCMYColor
  217. CMHLSColor                 RECORD    0
  218. hue                         ds.w    1                                    ; 0..65535. Fraction of circle. Red at 0 
  219. lightness                 ds.w    1                                    ; 0..65535 
  220. saturation                 ds.w    1                                    ; 0..65535 
  221. sizeof                     EQU    *
  222.                         ENDR
  223.  
  224. ; typedef struct CMHLSColor  CMHLSColor
  225. CMHSVColor                 RECORD    0
  226. hue                         ds.w    1                                    ; 0..65535. Fraction of circle. Red at 0 
  227. saturation                 ds.w    1                                    ; 0..65535 
  228. value                     ds.w    1                                    ; 0..65535 
  229. sizeof                     EQU    *
  230.                         ENDR
  231.  
  232. ; typedef struct CMHSVColor  CMHSVColor
  233. CMLabColor                 RECORD    0
  234. L                         ds.w    1                                    ; 0..65535 maps to 0..100 
  235. a                         ds.w    1                                    ; 0..65535 maps to -128..127.996 
  236. b                         ds.w    1                                    ; 0..65535 maps to -128..127.996 
  237. sizeof                     EQU    *
  238.                         ENDR
  239.  
  240. ; typedef struct CMLabColor  CMLabColor
  241. CMLuvColor                 RECORD    0
  242. L                         ds.w    1                                    ; 0..65535 maps to 0..100 
  243. u                         ds.w    1                                    ; 0..65535 maps to -128..127.996 
  244. v                         ds.w    1                                    ; 0..65535 maps to -128..127.996 
  245. sizeof                     EQU    *
  246.                         ENDR
  247.  
  248. ; typedef struct CMLuvColor  CMLuvColor
  249. CMYxyColor                 RECORD    0
  250. capY                     ds.w    1                                    ; 0..65535 maps to 0..1 
  251. x                         ds.w    1                                    ; 0..65535 maps to 0..1 
  252. y                         ds.w    1                                    ; 0..65535 maps to 0..1 
  253. sizeof                     EQU    *
  254.                         ENDR
  255.  
  256. ; typedef struct CMYxyColor  CMYxyColor
  257. CMGrayColor             RECORD    0
  258. gray                     ds.w    1                                    ; 0..65535 
  259. sizeof                     EQU    *
  260.                         ENDR
  261.  
  262. ; typedef struct CMGrayColor  CMGrayColor
  263. CMMultichannel5Color     RECORD    0
  264. components                 ds.b    5                                    ; 0..255 
  265. sizeof                     EQU    *
  266.                         ENDR
  267.  
  268. ; typedef struct CMMultichannel5Color  CMMultichannel5Color
  269. CMMultichannel6Color     RECORD    0
  270. components                 ds.b    6                                    ; 0..255 
  271. sizeof                     EQU    *
  272.                         ENDR
  273.  
  274. ; typedef struct CMMultichannel6Color  CMMultichannel6Color
  275. CMMultichannel7Color     RECORD    0
  276. components                 ds.b    7                                    ; 0..255 
  277. sizeof                     EQU    *
  278.                         ENDR
  279.  
  280. ; typedef struct CMMultichannel7Color  CMMultichannel7Color
  281. CMMultichannel8Color     RECORD    0
  282. components                 ds.b    8                                    ; 0..255 
  283. sizeof                     EQU    *
  284.                         ENDR
  285.  
  286. ; typedef struct CMMultichannel8Color  CMMultichannel8Color
  287. CMColor                 RECORD    0
  288. VariantLevel0Begin        EQU    *
  289. rgb                         ds        CMRGBColor
  290.                         ORG        VariantLevel0Begin
  291. hsv                         ds        CMHSVColor
  292.                         ORG        VariantLevel0Begin
  293. hls                         ds        CMHLSColor
  294.                         ORG        VariantLevel0Begin
  295. XYZ                         ds        CMXYZColor
  296.                         ORG        VariantLevel0Begin
  297. Lab                         ds        CMLabColor
  298.                         ORG        VariantLevel0Begin
  299. Luv                         ds        CMLuvColor
  300.                         ORG        VariantLevel0Begin
  301. Yxy                         ds        CMYxyColor
  302.                         ORG        VariantLevel0Begin
  303. cmyk                     ds        CMCMYKColor
  304.                         ORG        VariantLevel0Begin
  305. cmy                         ds        CMCMYColor
  306.                         ORG        VariantLevel0Begin
  307. gray                     ds        CMGrayColor
  308.                         ORG        VariantLevel0Begin
  309. mc5                         ds        CMMultichannel5Color
  310.                         ORG        VariantLevel0Begin
  311. mc6                         ds        CMMultichannel6Color
  312.                         ORG        VariantLevel0Begin
  313. mc7                         ds        CMMultichannel7Color
  314.                         ORG        VariantLevel0Begin
  315. mc8                         ds        CMMultichannel8Color
  316.                         ORG        8
  317. sizeof                     EQU    *
  318.                         ENDR
  319.  
  320. ; typedef union CMColor     CMColor
  321. CMProfileSearchRecord     RECORD    0
  322. header                     ds        CMHeader
  323. fieldMask                 ds.l    1
  324. reserved                 ds.l    2
  325. sizeof                     EQU    *
  326.                         ENDR
  327.  
  328. ; typedef struct CMProfileSearchRecord  CMProfileSearchRecord, **CMProfileSearchRecordHandle
  329. ; Search definition for 2.0 
  330. CMSearchRecord             RECORD    0
  331. CMMType                     ds.l    1
  332. profileClass             ds.l    1
  333. dataColorSpace             ds.l    1
  334. profileConnectionSpace     ds.l    1
  335. deviceManufacturer         ds.l    1
  336. deviceModel                 ds.l    1
  337. deviceAttributes         ds.l    2
  338. profileFlags             ds.l    1
  339. searchMask                 ds.l    1
  340. filter                     ds.l    1
  341. sizeof                     EQU    *
  342.                         ENDR
  343.  
  344. ; typedef struct CMSearchRecord  CMSearchRecord
  345. ; GetCWInfo structures 
  346. CMMInfoRecord             RECORD    0
  347. CMMType                     ds.l    1
  348. CMMVersion                 ds.l    1
  349. sizeof                     EQU    *
  350.                         ENDR
  351.  
  352. ; typedef struct CMMInfoRecord  CMMInfoRecord
  353. CMCWInfoRecord             RECORD    0
  354. cmmCount                 ds.l    1
  355. cmmInfo                     ds.b    2 * CMMInfoRecord.sizeof
  356. sizeof                     EQU    *
  357.                         ENDR
  358.  
  359. ; typedef struct CMCWInfoRecord  CMCWInfoRecord
  360.  
  361. cmNoColorPacking                EQU        $0000
  362. cmAlphaSpace                    EQU        $0080
  363. cmWord5ColorPacking                EQU        $0500
  364. cmLong8ColorPacking                EQU        $0800
  365. cmLong10ColorPacking            EQU        $0a00
  366. cmAlphaFirstPacking                EQU        $1000
  367. cmOneBitDirectPacking            EQU        $0b00
  368.  
  369. cmNoSpace                        EQU        0
  370. cmRGBSpace                        EQU        1
  371. cmCMYKSpace                        EQU        2
  372. cmHSVSpace                        EQU        3
  373. cmHLSSpace                        EQU        4
  374. cmYXYSpace                        EQU        5
  375. cmXYZSpace                        EQU        6
  376. cmLUVSpace                        EQU        7
  377. cmLABSpace                        EQU        8
  378. cmReservedSpace1                EQU        9
  379. cmGraySpace                        EQU        10
  380. cmReservedSpace2                EQU        11
  381. cmGamutResultSpace                EQU        12
  382. cmRGBASpace                        EQU        cmRGBSpace + cmAlphaSpace
  383. cmGrayASpace                    EQU        cmGraySpace + cmAlphaSpace
  384. cmRGB16Space                    EQU        cmWord5ColorPacking + cmRGBSpace
  385. cmRGB32Space                    EQU        cmLong8ColorPacking + cmRGBSpace
  386. cmARGB32Space                    EQU        cmLong8ColorPacking + cmAlphaFirstPacking + cmRGBASpace
  387. cmCMYK32Space                    EQU        cmLong8ColorPacking + cmCMYKSpace
  388. cmHSV32Space                    EQU        cmLong10ColorPacking + cmHSVSpace
  389. cmHLS32Space                    EQU        cmLong10ColorPacking + cmHLSSpace
  390. cmYXY32Space                    EQU        cmLong10ColorPacking + cmYXYSpace
  391. cmXYZ32Space                    EQU        cmLong10ColorPacking + cmXYZSpace
  392. cmLUV32Space                    EQU        cmLong10ColorPacking + cmLUVSpace
  393. cmLAB32Space                    EQU        cmLong10ColorPacking + cmLABSpace
  394. cmGamutResult1Space                EQU        cmOneBitDirectPacking + cmGamutResultSpace
  395.  
  396. ; typedef unsigned long     CMBitmapColorSpace
  397. CMBitmap                 RECORD    0
  398. image                     ds.l    1
  399. width                     ds.l    1
  400. height                     ds.l    1
  401. rowBytes                 ds.l    1
  402. pixelSize                 ds.l    1
  403. space                     ds.l    1
  404. user1                     ds.l    1
  405. user2                     ds.l    1
  406. sizeof                     EQU    *
  407.                         ENDR
  408.  
  409. ; typedef struct CMBitmap     CMBitmap
  410. ; Classic Print Manager Stuff 
  411.  
  412. enableColorMatchingOp            EQU        12
  413. registerProfileOp                EQU        13
  414.  
  415. ; PrGeneral parameter blocks 
  416. TEnableColorMatchingBlk RECORD    0
  417. iOpCode                     ds.w    1
  418. iError                     ds.w    1
  419. lReserved                 ds.l    1
  420. hPrint                     ds.l    1
  421. fEnableIt                 ds.b    1
  422. filler                     ds.b    1
  423. sizeof                     EQU    *
  424.                         ENDR
  425.  
  426. ; typedef struct TEnableColorMatchingBlk  TEnableColorMatchingBlk
  427. TRegisterProfileBlk     RECORD    0
  428. iOpCode                     ds.w    1
  429. iError                     ds.w    1
  430. lReserved                 ds.l    1
  431. hPrint                     ds.l    1
  432. fRegisterIt                 ds.b    1
  433. filler                     ds.b    1
  434. sizeof                     EQU    *
  435.                         ENDR
  436.  
  437. ; typedef struct TRegisterProfileBlk  TRegisterProfileBlk
  438.  
  439. cmNoProfileBase                    EQU        0
  440. cmFileBasedProfile                EQU        1
  441. cmHandleBasedProfile            EQU        2
  442. cmPtrBasedProfile                EQU        3
  443.  
  444. CMFileLocation             RECORD    0
  445. spec                     ds        FSSpec
  446. sizeof                     EQU    *
  447.                         ENDR
  448.  
  449. ; typedef struct CMFileLocation  CMFileLocation
  450. CMHandleLocation         RECORD    0
  451. h                         ds.l    1
  452. sizeof                     EQU    *
  453.                         ENDR
  454.  
  455. ; typedef struct CMHandleLocation  CMHandleLocation
  456. CMPtrLocation             RECORD    0
  457. p                         ds.l    1
  458. sizeof                     EQU    *
  459.                         ENDR
  460.  
  461. ; typedef struct CMPtrLocation  CMPtrLocation
  462. CMProfLoc                 RECORD    0
  463. VariantLevel0Begin        EQU    *
  464. fileLoc                     ds        CMFileLocation
  465.                         ORG        VariantLevel0Begin
  466. handleLoc                 ds        CMHandleLocation
  467.                         ORG        VariantLevel0Begin
  468. ptrLoc                     ds        CMPtrLocation
  469.                         ORG        70
  470. sizeof                     EQU    *
  471.                         ENDR
  472.  
  473. ; typedef union CMProfLoc     CMProfLoc
  474. CMProfileLocation         RECORD    0
  475. locType                     ds.w    1
  476. u                         ds.w    35
  477. sizeof                     EQU    *
  478.                         ENDR
  479.  
  480. ; typedef struct CMProfileLocation  CMProfileLocation
  481. ; Profile file and element access 
  482. ;
  483. ; pascal CMError CMOpenProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  484. ;
  485.     IF ¬ GENERATINGCFM THEN
  486.         Macro
  487.         _CMOpenProfile
  488.             dc.w     $203C
  489.             dc.w     $0008
  490.             dc.w     $001C
  491.             dc.w     $ABEE
  492.         EndM
  493.     ELSE
  494.         IMPORT    CMOpenProfile
  495.     ENDIF
  496.  
  497. ;
  498. ; pascal CMError CMCloseProfile(CMProfileRef prof)
  499. ;
  500.     IF ¬ GENERATINGCFM THEN
  501.         Macro
  502.         _CMCloseProfile
  503.             dc.w     $203C
  504.             dc.w     $0004
  505.             dc.w     $001D
  506.             dc.w     $ABEE
  507.         EndM
  508.     ELSE
  509.         IMPORT    CMCloseProfile
  510.     ENDIF
  511.  
  512. ;
  513. ; pascal CMError CMUpdateProfile(CMProfileRef prof)
  514. ;
  515.     IF ¬ GENERATINGCFM THEN
  516.         Macro
  517.         _CMUpdateProfile
  518.             dc.w     $203C
  519.             dc.w     $0004
  520.             dc.w     $0034
  521.             dc.w     $ABEE
  522.         EndM
  523.     ELSE
  524.         IMPORT    CMUpdateProfile
  525.     ENDIF
  526.  
  527. ;
  528. ; pascal CMError CMNewProfile(CMProfileRef *prof, const CMProfileLocation *theProfile)
  529. ;
  530.     IF ¬ GENERATINGCFM THEN
  531.         Macro
  532.         _CMNewProfile
  533.             dc.w     $203C
  534.             dc.w     $0008
  535.             dc.w     $001B
  536.             dc.w     $ABEE
  537.         EndM
  538.     ELSE
  539.         IMPORT    CMNewProfile
  540.     ENDIF
  541.  
  542. ;
  543. ; pascal CMError CMCopyProfile(CMProfileRef *targetProf, const CMProfileLocation *targetLocation, CMProfileRef srcProf)
  544. ;
  545.     IF ¬ GENERATINGCFM THEN
  546.         Macro
  547.         _CMCopyProfile
  548.             dc.w     $203C
  549.             dc.w     $000C
  550.             dc.w     $0025
  551.             dc.w     $ABEE
  552.         EndM
  553.     ELSE
  554.         IMPORT    CMCopyProfile
  555.     ENDIF
  556.  
  557. ;
  558. ; pascal CMError CMGetProfileLocation(CMProfileRef prof, CMProfileLocation *theProfile)
  559. ;
  560.     IF ¬ GENERATINGCFM THEN
  561.         Macro
  562.         _CMGetProfileLocation
  563.             dc.w     $203C
  564.             dc.w     $0008
  565.             dc.w     $003C
  566.             dc.w     $ABEE
  567.         EndM
  568.     ELSE
  569.         IMPORT    CMGetProfileLocation
  570.     ENDIF
  571.  
  572. ;
  573. ; pascal CMError CMValidateProfile(CMProfileRef prof, Boolean *valid, Boolean *preferredCMMnotfound)
  574. ;
  575.     IF ¬ GENERATINGCFM THEN
  576.         Macro
  577.         _CMValidateProfile
  578.             dc.w     $203C
  579.             dc.w     $000C
  580.             dc.w     $0026
  581.             dc.w     $ABEE
  582.         EndM
  583.     ELSE
  584.         IMPORT    CMValidateProfile
  585.     ENDIF
  586.  
  587. ;
  588. ; pascal CMError CMFlattenProfile(CMProfileRef prof, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  589. ;
  590.     IF ¬ GENERATINGCFM THEN
  591.         Macro
  592.         _CMFlattenProfile
  593.             dc.w     $203C
  594.             dc.w     $0014
  595.             dc.w     $0031
  596.             dc.w     $ABEE
  597.         EndM
  598.     ELSE
  599.         IMPORT    CMFlattenProfile
  600.     ENDIF
  601.  
  602. ;
  603. ; pascal CMError CMUnflattenProfile(FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  604. ;
  605.     IF ¬ GENERATINGCFM THEN
  606.         Macro
  607.         _CMUnflattenProfile
  608.             dc.w     $203C
  609.             dc.w     $0010
  610.             dc.w     $0032
  611.             dc.w     $ABEE
  612.         EndM
  613.     ELSE
  614.         IMPORT    CMUnflattenProfile
  615.     ENDIF
  616.  
  617. ;
  618. ; pascal CMError CMProfileElementExists(CMProfileRef prof, OSType tag, Boolean *found)
  619. ;
  620.     IF ¬ GENERATINGCFM THEN
  621.         Macro
  622.         _CMProfileElementExists
  623.             dc.w     $203C
  624.             dc.w     $000C
  625.             dc.w     $001E
  626.             dc.w     $ABEE
  627.         EndM
  628.     ELSE
  629.         IMPORT    CMProfileElementExists
  630.     ENDIF
  631.  
  632. ;
  633. ; pascal CMError CMCountProfileElements(CMProfileRef prof, unsigned long *elementCount)
  634. ;
  635.     IF ¬ GENERATINGCFM THEN
  636.         Macro
  637.         _CMCountProfileElements
  638.             dc.w     $203C
  639.             dc.w     $0008
  640.             dc.w     $001F
  641.             dc.w     $ABEE
  642.         EndM
  643.     ELSE
  644.         IMPORT    CMCountProfileElements
  645.     ENDIF
  646.  
  647. ;
  648. ; pascal CMError CMGetProfileElement(CMProfileRef prof, OSType tag, unsigned long *elementSize, void *elementData)
  649. ;
  650.     IF ¬ GENERATINGCFM THEN
  651.         Macro
  652.         _CMGetProfileElement
  653.             dc.w     $203C
  654.             dc.w     $0010
  655.             dc.w     $0020
  656.             dc.w     $ABEE
  657.         EndM
  658.     ELSE
  659.         IMPORT    CMGetProfileElement
  660.     ENDIF
  661.  
  662. ;
  663. ; pascal CMError CMGetProfileHeader(CMProfileRef prof, CMAppleProfileHeader *header)
  664. ;
  665.     IF ¬ GENERATINGCFM THEN
  666.         Macro
  667.         _CMGetProfileHeader
  668.             dc.w     $203C
  669.             dc.w     $0008
  670.             dc.w     $0039
  671.             dc.w     $ABEE
  672.         EndM
  673.     ELSE
  674.         IMPORT    CMGetProfileHeader
  675.     ENDIF
  676.  
  677. ;
  678. ; pascal CMError CMGetPartialProfileElement(CMProfileRef prof, OSType tag, unsigned long offset, unsigned long *byteCount, void *elementData)
  679. ;
  680.     IF ¬ GENERATINGCFM THEN
  681.         Macro
  682.         _CMGetPartialProfileElement
  683.             dc.w     $203C
  684.             dc.w     $0014
  685.             dc.w     $0036
  686.             dc.w     $ABEE
  687.         EndM
  688.     ELSE
  689.         IMPORT    CMGetPartialProfileElement
  690.     ENDIF
  691.  
  692. ;
  693. ; pascal CMError CMSetProfileElementSize(CMProfileRef prof, OSType tag, unsigned long elementSize)
  694. ;
  695.     IF ¬ GENERATINGCFM THEN
  696.         Macro
  697.         _CMSetProfileElementSize
  698.             dc.w     $203C
  699.             dc.w     $000C
  700.             dc.w     $0038
  701.             dc.w     $ABEE
  702.         EndM
  703.     ELSE
  704.         IMPORT    CMSetProfileElementSize
  705.     ENDIF
  706.  
  707. ;
  708. ; pascal CMError CMSetPartialProfileElement(CMProfileRef prof, OSType tag, unsigned long offset, unsigned long byteCount, void *elementData)
  709. ;
  710.     IF ¬ GENERATINGCFM THEN
  711.         Macro
  712.         _CMSetPartialProfileElement
  713.             dc.w     $203C
  714.             dc.w     $0014
  715.             dc.w     $0037
  716.             dc.w     $ABEE
  717.         EndM
  718.     ELSE
  719.         IMPORT    CMSetPartialProfileElement
  720.     ENDIF
  721.  
  722. ;
  723. ; pascal CMError CMGetIndProfileElementInfo(CMProfileRef prof, unsigned long index, OSType *tag, unsigned long *elementSize, Boolean *refs)
  724. ;
  725.     IF ¬ GENERATINGCFM THEN
  726.         Macro
  727.         _CMGetIndProfileElementInfo
  728.             dc.w     $203C
  729.             dc.w     $0014
  730.             dc.w     $0021
  731.             dc.w     $ABEE
  732.         EndM
  733.     ELSE
  734.         IMPORT    CMGetIndProfileElementInfo
  735.     ENDIF
  736.  
  737. ;
  738. ; pascal CMError CMGetIndProfileElement(CMProfileRef prof, unsigned long index, unsigned long *elementSize, void *elementData)
  739. ;
  740.     IF ¬ GENERATINGCFM THEN
  741.         Macro
  742.         _CMGetIndProfileElement
  743.             dc.w     $203C
  744.             dc.w     $0010
  745.             dc.w     $0022
  746.             dc.w     $ABEE
  747.         EndM
  748.     ELSE
  749.         IMPORT    CMGetIndProfileElement
  750.     ENDIF
  751.  
  752. ;
  753. ; pascal CMError CMSetProfileElement(CMProfileRef prof, OSType tag, unsigned long elementSize, void *elementData)
  754. ;
  755.     IF ¬ GENERATINGCFM THEN
  756.         Macro
  757.         _CMSetProfileElement
  758.             dc.w     $203C
  759.             dc.w     $0010
  760.             dc.w     $0023
  761.             dc.w     $ABEE
  762.         EndM
  763.     ELSE
  764.         IMPORT    CMSetProfileElement
  765.     ENDIF
  766.  
  767. ;
  768. ; pascal CMError CMSetProfileHeader(CMProfileRef prof, const CMAppleProfileHeader *header)
  769. ;
  770.     IF ¬ GENERATINGCFM THEN
  771.         Macro
  772.         _CMSetProfileHeader
  773.             dc.w     $203C
  774.             dc.w     $0008
  775.             dc.w     $003A
  776.             dc.w     $ABEE
  777.         EndM
  778.     ELSE
  779.         IMPORT    CMSetProfileHeader
  780.     ENDIF
  781.  
  782. ;
  783. ; pascal CMError CMSetProfileElementReference(CMProfileRef prof, OSType elementTag, OSType referenceTag)
  784. ;
  785.     IF ¬ GENERATINGCFM THEN
  786.         Macro
  787.         _CMSetProfileElementReference
  788.             dc.w     $203C
  789.             dc.w     $000C
  790.             dc.w     $0035
  791.             dc.w     $ABEE
  792.         EndM
  793.     ELSE
  794.         IMPORT    CMSetProfileElementReference
  795.     ENDIF
  796.  
  797. ;
  798. ; pascal CMError CMRemoveProfileElement(CMProfileRef prof, OSType tag)
  799. ;
  800.     IF ¬ GENERATINGCFM THEN
  801.         Macro
  802.         _CMRemoveProfileElement
  803.             dc.w     $203C
  804.             dc.w     $0008
  805.             dc.w     $0024
  806.             dc.w     $ABEE
  807.         EndM
  808.     ELSE
  809.         IMPORT    CMRemoveProfileElement
  810.     ENDIF
  811.  
  812. ;
  813. ; pascal CMError CMGetScriptProfileDescription(CMProfileRef prof, Str255 name, ScriptCode *code)
  814. ;
  815.     IF ¬ GENERATINGCFM THEN
  816.         Macro
  817.         _CMGetScriptProfileDescription
  818.             dc.w     $203C
  819.             dc.w     $000C
  820.             dc.w     $003E
  821.             dc.w     $ABEE
  822.         EndM
  823.     ELSE
  824.         IMPORT    CMGetScriptProfileDescription
  825.     ENDIF
  826.  
  827. ; Low-level matching functions 
  828. ;
  829. ; pascal CMError NCWNewColorWorld(CMWorldRef *cw, CMProfileRef src, CMProfileRef dst)
  830. ;
  831.     IF ¬ GENERATINGCFM THEN
  832.         Macro
  833.         _NCWNewColorWorld
  834.             dc.w     $203C
  835.             dc.w     $000C
  836.             dc.w     $0014
  837.             dc.w     $ABEE
  838.         EndM
  839.     ELSE
  840.         IMPORT    NCWNewColorWorld
  841.     ENDIF
  842.  
  843. ;
  844. ; pascal CMError CWConcatColorWorld(CMWorldRef *cw, CMConcatProfileSet *profileSet)
  845. ;
  846.     IF ¬ GENERATINGCFM THEN
  847.         Macro
  848.         _CWConcatColorWorld
  849.             dc.w     $203C
  850.             dc.w     $0008
  851.             dc.w     $0015
  852.             dc.w     $ABEE
  853.         EndM
  854.     ELSE
  855.         IMPORT    CWConcatColorWorld
  856.     ENDIF
  857.  
  858. ;
  859. ; pascal CMError CWNewLinkProfile(CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
  860. ;
  861.     IF ¬ GENERATINGCFM THEN
  862.         Macro
  863.         _CWNewLinkProfile
  864.             dc.w     $203C
  865.             dc.w     $000C
  866.             dc.w     $0033
  867.             dc.w     $ABEE
  868.         EndM
  869.     ELSE
  870.         IMPORT    CWNewLinkProfile
  871.     ENDIF
  872.  
  873. ;
  874. ; pascal void CWDisposeColorWorld(CMWorldRef cw)
  875. ;
  876.     IF ¬ GENERATINGCFM THEN
  877.         Macro
  878.         _CWDisposeColorWorld
  879.             dc.w     $203C
  880.             dc.w     $0004
  881.             dc.w     $0001
  882.             dc.w     $ABEE
  883.         EndM
  884.     ELSE
  885.         IMPORT    CWDisposeColorWorld
  886.     ENDIF
  887.  
  888. ;
  889. ; pascal CMError CWMatchColors(CMWorldRef cw, CMColor *myColors, unsigned long count)
  890. ;
  891.     IF ¬ GENERATINGCFM THEN
  892.         Macro
  893.         _CWMatchColors
  894.             dc.w     $203C
  895.             dc.w     $000C
  896.             dc.w     $0002
  897.             dc.w     $ABEE
  898.         EndM
  899.     ELSE
  900.         IMPORT    CWMatchColors
  901.     ENDIF
  902.  
  903. ;
  904. ; pascal CMError CWCheckColors(CMWorldRef cw, CMColor *myColors, unsigned long count, long *result)
  905. ;
  906.     IF ¬ GENERATINGCFM THEN
  907.         Macro
  908.         _CWCheckColors
  909.             dc.w     $203C
  910.             dc.w     $0010
  911.             dc.w     $0003
  912.             dc.w     $ABEE
  913.         EndM
  914.     ELSE
  915.         IMPORT    CWCheckColors
  916.     ENDIF
  917.  
  918. ; Bitmap matching 
  919. ;
  920. ; pascal CMError CWMatchBitmap(CMWorldRef cw, CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
  921. ;
  922.     IF ¬ GENERATINGCFM THEN
  923.         Macro
  924.         _CWMatchBitmap
  925.             dc.w     $203C
  926.             dc.w     $0010
  927.             dc.w     $002C
  928.             dc.w     $ABEE
  929.         EndM
  930.     ELSE
  931.         IMPORT    CWMatchBitmap
  932.     ENDIF
  933.  
  934. ;
  935. ; pascal CMError CWCheckBitmap(CMWorldRef cw, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
  936. ;
  937.     IF ¬ GENERATINGCFM THEN
  938.         Macro
  939.         _CWCheckBitmap
  940.             dc.w     $203C
  941.             dc.w     $0014
  942.             dc.w     $002D
  943.             dc.w     $ABEE
  944.         EndM
  945.     ELSE
  946.         IMPORT    CWCheckBitmap
  947.     ENDIF
  948.  
  949. ; Quickdraw-specific matching 
  950. ;
  951. ; pascal CMError CWMatchPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
  952. ;
  953.     IF ¬ GENERATINGCFM THEN
  954.         Macro
  955.         _CWMatchPixMap
  956.             dc.w     $203C
  957.             dc.w     $0010
  958.             dc.w     $0004
  959.             dc.w     $ABEE
  960.         EndM
  961.     ELSE
  962.         IMPORT    CWMatchPixMap
  963.     ENDIF
  964.  
  965. ;
  966. ; pascal CMError CWCheckPixMap(CMWorldRef cw, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon, BitMap *resultBitMap)
  967. ;
  968.     IF ¬ GENERATINGCFM THEN
  969.         Macro
  970.         _CWCheckPixMap
  971.             dc.w     $203C
  972.             dc.w     $0014
  973.             dc.w     $0007
  974.             dc.w     $ABEE
  975.         EndM
  976.     ELSE
  977.         IMPORT    CWCheckPixMap
  978.     ENDIF
  979.  
  980. ;
  981. ; pascal CMError NCMBeginMatching(CMProfileRef src, CMProfileRef dst, CMMatchRef *myRef)
  982. ;
  983.     IF ¬ GENERATINGCFM THEN
  984.         Macro
  985.         _NCMBeginMatching
  986.             dc.w     $203C
  987.             dc.w     $000C
  988.             dc.w     $0016
  989.             dc.w     $ABEE
  990.         EndM
  991.     ELSE
  992.         IMPORT    NCMBeginMatching
  993.     ENDIF
  994.  
  995. ;
  996. ; pascal void CMEndMatching(CMMatchRef myRef)
  997. ;
  998.     IF ¬ GENERATINGCFM THEN
  999.         Macro
  1000.         _CMEndMatching
  1001.             dc.w     $203C
  1002.             dc.w     $0004
  1003.             dc.w     $000B
  1004.             dc.w     $ABEE
  1005.         EndM
  1006.     ELSE
  1007.         IMPORT    CMEndMatching
  1008.     ENDIF
  1009.  
  1010. ;
  1011. ; pascal void NCMDrawMatchedPicture(PicHandle myPicture, CMProfileRef dst, Rect *myRect)
  1012. ;
  1013.     IF ¬ GENERATINGCFM THEN
  1014.         Macro
  1015.         _NCMDrawMatchedPicture
  1016.             dc.w     $203C
  1017.             dc.w     $000C
  1018.             dc.w     $0017
  1019.             dc.w     $ABEE
  1020.         EndM
  1021.     ELSE
  1022.         IMPORT    NCMDrawMatchedPicture
  1023.     ENDIF
  1024.  
  1025. ;
  1026. ; pascal void CMEnableMatchingComment(Boolean enableIt)
  1027. ;
  1028.     IF ¬ GENERATINGCFM THEN
  1029.         Macro
  1030.         _CMEnableMatchingComment
  1031.             dc.w     $203C
  1032.             dc.w     $0002
  1033.             dc.w     $000D
  1034.             dc.w     $ABEE
  1035.         EndM
  1036.     ELSE
  1037.         IMPORT    CMEnableMatchingComment
  1038.     ENDIF
  1039.  
  1040. ;
  1041. ; pascal CMError NCMUseProfileComment(CMProfileRef prof, unsigned long flags)
  1042. ;
  1043.     IF ¬ GENERATINGCFM THEN
  1044.         Macro
  1045.         _NCMUseProfileComment
  1046.             dc.w     $203C
  1047.             dc.w     $0008
  1048.             dc.w     $003B
  1049.             dc.w     $ABEE
  1050.         EndM
  1051.     ELSE
  1052.         IMPORT    NCMUseProfileComment
  1053.     ENDIF
  1054.  
  1055. ; System Profile access 
  1056. ;
  1057. ; pascal CMError CMGetSystemProfile(CMProfileRef *prof)
  1058. ;
  1059.     IF ¬ GENERATINGCFM THEN
  1060.         Macro
  1061.         _CMGetSystemProfile
  1062.             dc.w     $203C
  1063.             dc.w     $0004
  1064.             dc.w     $0018
  1065.             dc.w     $ABEE
  1066.         EndM
  1067.     ELSE
  1068.         IMPORT    CMGetSystemProfile
  1069.     ENDIF
  1070.  
  1071. ;
  1072. ; pascal CMError CMSetSystemProfile(const FSSpec *profileFileSpec)
  1073. ;
  1074.     IF ¬ GENERATINGCFM THEN
  1075.         Macro
  1076.         _CMSetSystemProfile
  1077.             dc.w     $203C
  1078.             dc.w     $0004
  1079.             dc.w     $0019
  1080.             dc.w     $ABEE
  1081.         EndM
  1082.     ELSE
  1083.         IMPORT    CMSetSystemProfile
  1084.     ENDIF
  1085.  
  1086. ; External Profile Management 
  1087. ;
  1088. ; pascal CMError CMNewProfileSearch(CMSearchRecord *searchSpec, void *refCon, unsigned long *count, CMProfileSearchRef *searchResult)
  1089. ;
  1090.     IF ¬ GENERATINGCFM THEN
  1091.         Macro
  1092.         _CMNewProfileSearch
  1093.             dc.w     $203C
  1094.             dc.w     $0010
  1095.             dc.w     $0027
  1096.             dc.w     $ABEE
  1097.         EndM
  1098.     ELSE
  1099.         IMPORT    CMNewProfileSearch
  1100.     ENDIF
  1101.  
  1102. ;
  1103. ; pascal CMError CMUpdateProfileSearch(CMProfileSearchRef search, void *refCon, unsigned long *count)
  1104. ;
  1105.     IF ¬ GENERATINGCFM THEN
  1106.         Macro
  1107.         _CMUpdateProfileSearch
  1108.             dc.w     $203C
  1109.             dc.w     $000C
  1110.             dc.w     $0028
  1111.             dc.w     $ABEE
  1112.         EndM
  1113.     ELSE
  1114.         IMPORT    CMUpdateProfileSearch
  1115.     ENDIF
  1116.  
  1117. ;
  1118. ; pascal void CMDisposeProfileSearch(CMProfileSearchRef search)
  1119. ;
  1120.     IF ¬ GENERATINGCFM THEN
  1121.         Macro
  1122.         _CMDisposeProfileSearch
  1123.             dc.w     $203C
  1124.             dc.w     $0004
  1125.             dc.w     $0029
  1126.             dc.w     $ABEE
  1127.         EndM
  1128.     ELSE
  1129.         IMPORT    CMDisposeProfileSearch
  1130.     ENDIF
  1131.  
  1132. ;
  1133. ; pascal CMError CMSearchGetIndProfile(CMProfileSearchRef search, unsigned long index, CMProfileRef *prof)
  1134. ;
  1135.     IF ¬ GENERATINGCFM THEN
  1136.         Macro
  1137.         _CMSearchGetIndProfile
  1138.             dc.w     $203C
  1139.             dc.w     $000C
  1140.             dc.w     $002A
  1141.             dc.w     $ABEE
  1142.         EndM
  1143.     ELSE
  1144.         IMPORT    CMSearchGetIndProfile
  1145.     ENDIF
  1146.  
  1147. ;
  1148. ; pascal CMError CMSearchGetIndProfileFileSpec(CMProfileSearchRef search, unsigned long index, FSSpec *profileFile)
  1149. ;
  1150.     IF ¬ GENERATINGCFM THEN
  1151.         Macro
  1152.         _CMSearchGetIndProfileFileSpec
  1153.             dc.w     $203C
  1154.             dc.w     $000C
  1155.             dc.w     $002B
  1156.             dc.w     $ABEE
  1157.         EndM
  1158.     ELSE
  1159.         IMPORT    CMSearchGetIndProfileFileSpec
  1160.     ENDIF
  1161.  
  1162. ; Utilities 
  1163. ;
  1164. ; pascal CMError CMGetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  1165. ;
  1166.     IF ¬ GENERATINGCFM THEN
  1167.         Macro
  1168.         _CMGetColorSyncFolderSpec
  1169.             dc.w     $203C
  1170.             dc.w     $000C
  1171.             dc.w     $0011
  1172.             dc.w     $ABEE
  1173.         EndM
  1174.     ELSE
  1175.         IMPORT    CMGetColorSyncFolderSpec
  1176.     ENDIF
  1177.  
  1178. ;
  1179. ; pascal CMError CMGetCWInfo(CMWorldRef cw, CMCWInfoRecord *info)
  1180. ;
  1181.     IF ¬ GENERATINGCFM THEN
  1182.         Macro
  1183.         _CMGetCWInfo
  1184.             dc.w     $203C
  1185.             dc.w     $000C
  1186.             dc.w     $001A
  1187.             dc.w     $ABEE
  1188.         EndM
  1189.     ELSE
  1190.         IMPORT    CMGetCWInfo
  1191.     ENDIF
  1192.  
  1193. ; PS-related 
  1194. ;
  1195. ; pascal CMError CMGetPS2ColorSpace(CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1196. ;
  1197.     IF ¬ GENERATINGCFM THEN
  1198.         Macro
  1199.         _CMGetPS2ColorSpace
  1200.             dc.w     $203C
  1201.             dc.w     $0014
  1202.             dc.w     $002E
  1203.             dc.w     $ABEE
  1204.         EndM
  1205.     ELSE
  1206.         IMPORT    CMGetPS2ColorSpace
  1207.     ENDIF
  1208.  
  1209. ;
  1210. ; pascal CMError CMGetPS2ColorRenderingIntent(CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1211. ;
  1212.     IF ¬ GENERATINGCFM THEN
  1213.         Macro
  1214.         _CMGetPS2ColorRenderingIntent
  1215.             dc.w     $203C
  1216.             dc.w     $0014
  1217.             dc.w     $002F
  1218.             dc.w     $ABEE
  1219.         EndM
  1220.     ELSE
  1221.         IMPORT    CMGetPS2ColorRenderingIntent
  1222.     ENDIF
  1223.  
  1224. ;
  1225. ; pascal CMError CMGetPS2ColorRendering(CMProfileRef srcProf, CMProfileRef dstProf, unsigned long flags, CMFlattenUPP proc, void *refCon, Boolean *preferredCMMnotfound)
  1226. ;
  1227.     IF ¬ GENERATINGCFM THEN
  1228.         Macro
  1229.         _CMGetPS2ColorRendering
  1230.             dc.w     $203C
  1231.             dc.w     $0018
  1232.             dc.w     $0030
  1233.             dc.w     $ABEE
  1234.         EndM
  1235.     ELSE
  1236.         IMPORT    CMGetPS2ColorRendering
  1237.     ENDIF
  1238.  
  1239. ;
  1240. ; pascal CMError CMGetPS2ColorRenderingVMSize(CMProfileRef srcProf, CMProfileRef dstProf, unsigned long *vmSize, Boolean *preferredCMMnotfound)
  1241. ;
  1242.     IF ¬ GENERATINGCFM THEN
  1243.         Macro
  1244.         _CMGetPS2ColorRenderingVMSize
  1245.             dc.w     $203C
  1246.             dc.w     $0010
  1247.             dc.w     $003D
  1248.             dc.w     $ABEE
  1249.         EndM
  1250.     ELSE
  1251.         IMPORT    CMGetPS2ColorRenderingVMSize
  1252.     ENDIF
  1253.  
  1254. ; ColorSync 1.0 functions which have parallel 2.0 counterparts 
  1255. ;
  1256. ; pascal CMError CWNewColorWorld(CMWorldRef *cw, CMProfileHandle src, CMProfileHandle dst)
  1257. ;
  1258.     IF ¬ GENERATINGCFM THEN
  1259.         Macro
  1260.         _CWNewColorWorld
  1261.             dc.w     $203C
  1262.             dc.w     $000C
  1263.             dc.w     $0000
  1264.             dc.w     $ABEE
  1265.         EndM
  1266.     ELSE
  1267.         IMPORT    CWNewColorWorld
  1268.     ENDIF
  1269.  
  1270. ;
  1271. ; pascal CMError ConcatenateProfiles(CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
  1272. ;
  1273.     IF ¬ GENERATINGCFM THEN
  1274.         Macro
  1275.         _ConcatenateProfiles
  1276.             dc.w     $203C
  1277.             dc.w     $000C
  1278.             dc.w     $000C
  1279.             dc.w     $ABEE
  1280.         EndM
  1281.     ELSE
  1282.         IMPORT    ConcatenateProfiles
  1283.     ENDIF
  1284.  
  1285. ;
  1286. ; pascal CMError CMBeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1287. ;
  1288.     IF ¬ GENERATINGCFM THEN
  1289.         Macro
  1290.         _CMBeginMatching
  1291.             dc.w     $203C
  1292.             dc.w     $000C
  1293.             dc.w     $000A
  1294.             dc.w     $ABEE
  1295.         EndM
  1296.     ELSE
  1297.         IMPORT    CMBeginMatching
  1298.     ENDIF
  1299.  
  1300. ;
  1301. ; pascal void CMDrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1302. ;
  1303.     IF ¬ GENERATINGCFM THEN
  1304.         Macro
  1305.         _CMDrawMatchedPicture
  1306.             dc.w     $203C
  1307.             dc.w     $000C
  1308.             dc.w     $0009
  1309.             dc.w     $ABEE
  1310.         EndM
  1311.     ELSE
  1312.         IMPORT    CMDrawMatchedPicture
  1313.     ENDIF
  1314.  
  1315. ;
  1316. ; pascal CMError CMUseProfileComment(CMProfileHandle profile)
  1317. ;
  1318.     IF ¬ GENERATINGCFM THEN
  1319.         Macro
  1320.         _CMUseProfileComment
  1321.             dc.w     $203C
  1322.             dc.w     $0004
  1323.             dc.w     $0008
  1324.             dc.w     $ABEE
  1325.         EndM
  1326.     ELSE
  1327.         IMPORT    CMUseProfileComment
  1328.     ENDIF
  1329.  
  1330. ;
  1331. ; pascal void CMGetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1332. ;
  1333.     IF ¬ GENERATINGCFM THEN
  1334.         Macro
  1335.         _CMGetProfileName
  1336.             dc.w     $203C
  1337.             dc.w     $0008
  1338.             dc.w     $000E
  1339.             dc.w     $ABEE
  1340.         EndM
  1341.     ELSE
  1342.         IMPORT    CMGetProfileName
  1343.     ENDIF
  1344.  
  1345. ;
  1346. ; pascal long CMGetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1347. ;
  1348.     IF ¬ GENERATINGCFM THEN
  1349.         Macro
  1350.         _CMGetProfileAdditionalDataOffset
  1351.             dc.w     $203C
  1352.             dc.w     $0004
  1353.             dc.w     $000F
  1354.             dc.w     $ABEE
  1355.         EndM
  1356.     ELSE
  1357.         IMPORT    CMGetProfileAdditionalDataOffset
  1358.     ENDIF
  1359.  
  1360. ; ProfileResponder functions 
  1361. ;
  1362. ; pascal CMError GetProfile(OSType deviceType, long refNum, CMProfileHandle aProfile, CMProfileHandle *returnedProfile)
  1363. ;
  1364.     IF ¬ GENERATINGCFM THEN
  1365.         Macro
  1366.         _GetProfile
  1367.             dc.w     $203C
  1368.             dc.w     $0010
  1369.             dc.w     $0005
  1370.             dc.w     $ABEE
  1371.         EndM
  1372.     ELSE
  1373.         IMPORT    GetProfile
  1374.     ENDIF
  1375.  
  1376. ;
  1377. ; pascal CMError SetProfile(OSType deviceType, long refNum, CMProfileHandle newProfile)
  1378. ;
  1379.     IF ¬ GENERATINGCFM THEN
  1380.         Macro
  1381.         _SetProfile
  1382.             dc.w     $203C
  1383.             dc.w     $000C
  1384.             dc.w     $0006
  1385.             dc.w     $ABEE
  1386.         EndM
  1387.     ELSE
  1388.         IMPORT    SetProfile
  1389.     ENDIF
  1390.  
  1391. ;
  1392. ; pascal CMError SetProfileDescription(OSType deviceType, long refNum, long deviceData, CMProfileHandle hProfile)
  1393. ;
  1394.     IF ¬ GENERATINGCFM THEN
  1395.         Macro
  1396.         _SetProfileDescription
  1397.             dc.w     $203C
  1398.             dc.w     $0010
  1399.             dc.w     $0010
  1400.             dc.w     $ABEE
  1401.         EndM
  1402.     ELSE
  1403.         IMPORT    SetProfileDescription
  1404.     ENDIF
  1405.  
  1406. ;
  1407. ; pascal CMError GetIndexedProfile(OSType deviceType, long refNum, CMProfileSearchRecordHandle search, CMProfileHandle *returnProfile, long *index)
  1408. ;
  1409.     IF ¬ GENERATINGCFM THEN
  1410.         Macro
  1411.         _GetIndexedProfile
  1412.             dc.w     $203C
  1413.             dc.w     $0014
  1414.             dc.w     $0012
  1415.             dc.w     $ABEE
  1416.         EndM
  1417.     ELSE
  1418.         IMPORT    GetIndexedProfile
  1419.     ENDIF
  1420.  
  1421. ;
  1422. ; pascal CMError DeleteDeviceProfile(OSType deviceType, long refNum, CMProfileHandle deleteMe)
  1423. ;
  1424.     IF ¬ GENERATINGCFM THEN
  1425.         Macro
  1426.         _DeleteDeviceProfile
  1427.             dc.w     $203C
  1428.             dc.w     $000C
  1429.             dc.w     $0013
  1430.             dc.w     $ABEE
  1431.         EndM
  1432.     ELSE
  1433.         IMPORT    DeleteDeviceProfile
  1434.     ENDIF
  1435.  
  1436.     IF OLDROUTINENAMES  THEN
  1437.  
  1438. kMatchCMMType                    EQU        cmMatchCMMType
  1439. kMatchApplProfileVersion        EQU        cmMatchApplProfileVersion
  1440. kMatchDataType                    EQU        cmMatchDataType
  1441. kMatchDeviceType                EQU        cmMatchDeviceType
  1442. kMatchDeviceManufacturer        EQU        cmMatchDeviceManufacturer
  1443. kMatchDeviceModel                EQU        cmMatchDeviceModel
  1444. kMatchDeviceAttributes            EQU        cmMatchDeviceAttributes
  1445. kMatchFlags                        EQU        cmMatchFlags
  1446. kMatchOptions                    EQU        cmMatchOptions
  1447. kMatchWhite                        EQU        cmMatchWhite
  1448. kMatchBlack                        EQU        cmMatchBlack
  1449.  
  1450. ; types 
  1451. ; typedef struct CMCMYKColor  CMYKColor
  1452. ; typedef CMWorldRef         CWorld
  1453. ; typedef long                 *CMGamutResult
  1454. ; functions 
  1455. ;
  1456. ; pascal void EndMatching(CMMatchRef myRef)
  1457. ;
  1458.     IF ¬ GENERATINGCFM THEN
  1459.         Macro
  1460.         _EndMatching
  1461.             dc.w     $203C
  1462.             dc.w     $0004
  1463.             dc.w     $000B
  1464.             dc.w     $ABEE
  1465.         EndM
  1466.     ELSE
  1467.         IMPORT    EndMatching
  1468.     ENDIF
  1469.  
  1470. ;
  1471. ; pascal void EnableMatching(Boolean enableIt)
  1472. ;
  1473.     IF ¬ GENERATINGCFM THEN
  1474.         Macro
  1475.         _EnableMatching
  1476.             dc.w     $203C
  1477.             dc.w     $0002
  1478.             dc.w     $000D
  1479.             dc.w     $ABEE
  1480.         EndM
  1481.     ELSE
  1482.         IMPORT    EnableMatching
  1483.     ENDIF
  1484.  
  1485. ;
  1486. ; pascal CMError GetColorSyncFolderSpec(short vRefNum, Boolean createFolder, short *foundVRefNum, long *foundDirID)
  1487. ;
  1488.     IF ¬ GENERATINGCFM THEN
  1489.         Macro
  1490.         _GetColorSyncFolderSpec
  1491.             dc.w     $203C
  1492.             dc.w     $000C
  1493.             dc.w     $0011
  1494.             dc.w     $ABEE
  1495.         EndM
  1496.     ELSE
  1497.         IMPORT    GetColorSyncFolderSpec
  1498.     ENDIF
  1499.  
  1500. ;
  1501. ; pascal CMError BeginMatching(CMProfileHandle src, CMProfileHandle dst, CMMatchRef *myRef)
  1502. ;
  1503.     IF ¬ GENERATINGCFM THEN
  1504.         Macro
  1505.         _BeginMatching
  1506.             dc.w     $203C
  1507.             dc.w     $000C
  1508.             dc.w     $000A
  1509.             dc.w     $ABEE
  1510.         EndM
  1511.     ELSE
  1512.         IMPORT    BeginMatching
  1513.     ENDIF
  1514.  
  1515. ;
  1516. ; pascal void DrawMatchedPicture(PicHandle myPicture, CMProfileHandle dst, Rect *myRect)
  1517. ;
  1518.     IF ¬ GENERATINGCFM THEN
  1519.         Macro
  1520.         _DrawMatchedPicture
  1521.             dc.w     $203C
  1522.             dc.w     $000C
  1523.             dc.w     $0009
  1524.             dc.w     $ABEE
  1525.         EndM
  1526.     ELSE
  1527.         IMPORT    DrawMatchedPicture
  1528.     ENDIF
  1529.  
  1530. ;
  1531. ; pascal CMError UseProfile(CMProfileHandle profile)
  1532. ;
  1533.     IF ¬ GENERATINGCFM THEN
  1534.         Macro
  1535.         _UseProfile
  1536.             dc.w     $203C
  1537.             dc.w     $0004
  1538.             dc.w     $0008
  1539.             dc.w     $ABEE
  1540.         EndM
  1541.     ELSE
  1542.         IMPORT    UseProfile
  1543.     ENDIF
  1544.  
  1545. ;
  1546. ; pascal void GetProfileName(CMProfileHandle myProfile, CMIString *IStringResult)
  1547. ;
  1548.     IF ¬ GENERATINGCFM THEN
  1549.         Macro
  1550.         _GetProfileName
  1551.             dc.w     $203C
  1552.             dc.w     $0008
  1553.             dc.w     $000E
  1554.             dc.w     $ABEE
  1555.         EndM
  1556.     ELSE
  1557.         IMPORT    GetProfileName
  1558.     ENDIF
  1559.  
  1560. ;
  1561. ; pascal long GetProfileAdditionalDataOffset(CMProfileHandle myProfile)
  1562. ;
  1563.     IF ¬ GENERATINGCFM THEN
  1564.         Macro
  1565.         _GetProfileAdditionalDataOffset
  1566.             dc.w     $203C
  1567.             dc.w     $0004
  1568.             dc.w     $000F
  1569.             dc.w     $ABEE
  1570.         EndM
  1571.     ELSE
  1572.         IMPORT    GetProfileAdditionalDataOffset
  1573.     ENDIF
  1574.  
  1575.     ENDIF
  1576.     ENDIF ; __CMAPPLICATION__
  1577.